package com.mc.service.impl;

import com.mc.bean.Match;
import com.mc.dao.Impl.MatchDaoImpl;
import com.mc.dao.MatchDao;
import com.mc.service.MatchService;

import java.util.List;

/**
 * @Description 赛事业务逻辑接口实现类
 * @author wangcf
 * @date 2023/2/13 16:38
 * @version 1.0
 */
public class MatchServiceImpl implements MatchService {
    MatchDao matchDao=new MatchDaoImpl();

    @Override
    public List<Match> findAll() {
        return matchDao.findAll();
    }

    @Override
    public Match findByMid(int mid) {
        return matchDao.findByMid(mid);
    }

    @Override
    public List<Match> findByMSid(int msid) {
        return matchDao.findByMSid(msid);
    }

    @Override
    public List<Match> findByMTid(int mtid) {
        return matchDao.findByMTid(mtid);
    }

    @Override
    public List<Match> find(String mname) {
        return matchDao.find(mname);
    }

    @Override
    public List<Match> findStartTime() {
        return matchDao.findStartTime();
    }

    @Override
    public List<Match> findEndTime() {
        return matchDao.findEndTime();
    }

    @Override
    public boolean add(Match match) {
        return matchDao.add(match)>0?true:false;
    }

    @Override
    public boolean delete(int mid) {
        return matchDao.delete(mid)>0?true:false;
    }

    @Override
    public boolean update(Match match) {
        return matchDao.update(match)>0?true:false;
    }
}
